import java.util.Scanner;

public class Text6 {
    //一个数二进制有多少个1
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int c=sc.nextInt();
        int count=0;
        while (true){
            if(c==0){
                break;
            }
          count+=(c&1);
            c>>=1;
        }
        System.out.println(count);
    }
}
